Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle undefined DashboardData props #1726

Merged
merged 6 commits into from
Jan 22, 2024

Conversation

bmingles
Copy link
Contributor

@bmingles bmingles commented Jan 11, 2024

  • Handle undefined props on DashboardData. Don't render console panel if no session
  • Fixed a set state on unmounted HeapUsage bug
  • Removed chatty async interval debug logging

fixes #1684

Testing

  • Run server with PSK enabled
  • Login and open any file
  • Logout should no longer show "ConsolePanel.tsx:372 Uncaught TypeError: Cannot destructure property 'config' of 'sessionWrapper' as it is undefined." error in debug console (Note that login will still fail until Open file blocks logout #1685 is done)

@bmingles bmingles requested a review from mofojed January 11, 2024 17:17
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (db219ca) 46.05% compared to head (607aa5e) 46.42%.
Report is 2 commits behind head on main.

❗ Current head 607aa5e differs from pull request most recent head 493c5a1. Consider uploading reports for the commit 493c5a1 to get more accurate results

Files Patch % Lines
...ashboard-core-plugins/src/panels/NotebookPanel.tsx 0.00% 5 Missing ⚠️
packages/code-studio/src/main/AppMainContainer.tsx 50.00% 4 Missing ⚠️
...dashboard-core-plugins/src/panels/ConsolePanel.tsx 42.85% 4 Missing ⚠️
...ages/dashboard-core-plugins/src/redux/selectors.ts 20.00% 4 Missing ⚠️
packages/console/src/HeapUsage.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1726      +/-   ##
==========================================
+ Coverage   46.05%   46.42%   +0.37%     
==========================================
  Files         621      611      -10     
  Lines       37430    37221     -209     
  Branches     9399     9376      -23     
==========================================
+ Hits        17237    17281      +44     
+ Misses      20139    19886     -253     
  Partials       54       54              
Flag Coverage Δ
unit 46.42% <28.57%> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmingles bmingles force-pushed the 1684-console-panel-no-session branch from 607aa5e to c2b029c Compare January 19, 2024 16:46
@bmingles bmingles requested a review from mofojed January 19, 2024 16:48
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getDashboardSessionWrapper currently only returns SessionWrapper - that needs to be updated to allow undefined as well.

@bmingles bmingles requested a review from mofojed January 22, 2024 18:46
@bmingles bmingles merged commit 45fa929 into deephaven:main Jan 22, 2024
4 checks passed
@bmingles bmingles deleted the 1684-console-panel-no-session branch January 22, 2024 21:33
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConsolePanel should not render if there is no session
3 participants